package com.apexcode.friend.controller.exam;

import com.apexcode.common.core.controller.BaseController;
import com.apexcode.common.core.domain.R;
import com.apexcode.common.core.domain.TableDataInfo;
import com.apexcode.friend.domain.exam.dto.ExamQueryDTO;
import com.apexcode.friend.service.exam.IExamService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName ExamController
 * @Description
 * @Author ZJX
 * @Date 2025/2/6 17:57
 * @Version 1.0
 **/
@RestController
@RequestMapping("/exam")
public class ExamController extends BaseController {

    @Autowired
    private IExamService examService;

    @GetMapping("/semiLogin/list")
    public TableDataInfo list(ExamQueryDTO examQueryDTO){
        return getTableDataInfo(examService.list(examQueryDTO));
    }

    @GetMapping("/semiLogin/redis/list")
    public TableDataInfo redisList(ExamQueryDTO examQueryDTO){
        return examService.redisList(examQueryDTO);
    }

    @GetMapping("/getFirstQuestion")
    public R<String> getFirstQuestion(Long examId){
        return R.ok(examService.getFirstQuestion(examId));
    }

  
}
